package com.share.wechat.core.entity;


import javax.persistence.*;

/**
 * 微信用户信息表结构
 */
@Entity
@Table(name = "WEB_SYS_USER")
public class UserDetail {
    /**
     * id
     */
    @Id
    private String id;
    /**
     * 性别 1男 0女
     */
    private int gander;
    /**
     * 用户的昵称
     */
    private String nickName;
    /**
     * 用户头像，最后一个数值代表正方形头像大小（
     * 有0、46、64、96、132数值可选，0代表640*640正方形头像）
     * 用户没有头像时该项为空。若用户更换头像，原有头像URL将失效
     */
    private String avatarUrl;
    /**
     * 用户城市
     */
    private String city;
    /**
     * 省份
     */
    private String province;
    /**
     * 国家
     */
    private String country;
    /**
     * 语言
     * 用户的语言，简体中文为zh_CN
     */
    @Column(name = "C_LANGUAGE")
    private String language;

    /**
     * 默认添加的一个code注解
     */
    @Transient
    private String code;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public int getGander() {
        return gander;
    }

    public void setGander(int gander) {
        this.gander = gander;
    }

    public String getNickName() {
        return nickName;
    }

    public void setNickName(String nickName) {
        this.nickName = nickName;
    }

    public String getAvatarUrl() {
        return avatarUrl;
    }

    public void setAvatarUrl(String avatarUrl) {
        this.avatarUrl = avatarUrl;
    }

    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }

    public String getProvince() {
        return province;
    }

    public void setProvince(String province) {
        this.province = province;
    }

    public String getCountry() {
        return country;
    }

    public void setCountry(String country) {
        this.country = country;
    }

    public String getLanguage() {
        return language;
    }

    public void setLanguage(String language) {
        this.language = language;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    @Override
    public String toString() {
        return "UserDetail{" +
                "id='" + id + '\'' +
                ", gander=" + gander +
                ", nickName='" + nickName + '\'' +
                ", avatarUrl='" + avatarUrl + '\'' +
                ", city='" + city + '\'' +
                ", province='" + province + '\'' +
                ", country='" + country + '\'' +
                ", language='" + language + '\'' +
                ", code='" + code + '\'' +
                '}';
    }
}
